package com.example.designpatterns.chain;

/**
 * WarningHandler类 - 处理WARNING类型的请求
 */
public class WarningHandler extends Handler {
    
    public WarningHandler() {
        super("警告处理器");
    }
    
    @Override
    protected boolean canHandle(Request request) {
        return request.getType() == Request.RequestType.WARNING;
    }
    
    @Override
    protected void doHandle(Request request) {
        System.out.println("警告处理器处理请求: " + request.getMessage());
        System.out.println("警告信息已记录，并发送通知给开发团队");
        request.setHandled(true);
    }
} 